#include <stdio.h>
#include <CompileVisitor.h>

#include "AstNodeExpression.h"
#include "AstNodeAssignmentStatement.h"

AstNodeAssignment::AstNodeAssignment(
    AstNode * lvalue, AstNodeExpression * expr)
{
  this->lvalue=lvalue;
  this->expr=expr;
}

void AstNodeAssignment::dump(int level)
{
  printf("assign: ");
  expr->dump();
  printf(" to ");
  lvalue->dump();
  printf("\n");
}

void AstNodeAssignment::compile(CompileVisitor * visitor)
{
  visitor->compile(this);
}

